import os
import shutil
jpg_path = './UW20170906/JPEGImages'
xml_path = './det_dataset_0901/train/all_anno'
copy_path = './test'
xml_post = '.xml'
# i = 0
for file in os.listdir(jpg_path):
    if os.path.isfile(os.path.join(jpg_path,file)) == True:
        if(file[0]=='V' and file[1]=='i'):
           name = file.split('.')
           xml_name = name[0] + xml_post
           shutil.copy(os.path.join(xml_path, xml_name), copy_path)
           print(os.path.join(xml_path, xml_name))
